﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NVR.IDAL
{
    public interface IDALNVRDeviceInfo
    {
        int Insert(Entity.NVRDeviceInfo obj);
        int Update(Entity.NVRDeviceInfo obj);
        int Delete(Entity.NVRDeviceInfo obj);
        List<Entity.NVRDeviceInfo> LoadAll();
        Entity.NVRDeviceInfo LoadById(string deviceSN);
        List<Entity.NVRDeviceInfo> LoadByUserName(string username);

        /// <summary>
        /// 分页函数，基于username
        /// </summary>
        /// <returns></returns>
        List<Entity.NVRDeviceInfo> PagePartFunc(int currentPage, int pageSize, out int counts, out int pageNums, string username);

        //List<Entity.NVRDeviceInfo> LoadDVRInfoAndDevInfo(string username);
        /// <summary>
        /// 联合两个表基于Sn进行联合查询。
        /// 命名规则.QueryListFK(Sn)(要查询的联合键值)_表1_REF_表2
        /// </summary>
        /// <returns></returns>
       // List<Entity.NVRDeviceInfo> QurryListFKSn_NVRDev_REF_Dev(string username);
        int GetNvrNums(string username);

    }
}
